package com.fh.modules.dbms.service;

import com.fh.common.web.AbstractService;
import com.fh.db.DbPackage;
import com.fh.modules.dbms.entity.DbmsPackage;
import com.fh.modules.dbms.model.PackageCompareResult;

import java.util.List;

/**
 * @Author qiujunda
 * @Date 23/07/2020
 * @Description
 */
public interface IDbmsPackageService extends AbstractService<DbmsPackage> {
    /**
     * 新增修改包
     * @param dbPackage
     * @param sourceId
     * @param collectSid
     * @return
     */
    DbmsPackage addOrUpdateDbmsPackage(DbPackage dbPackage, Long sourceId, String collectSid);

    /**
     * 对比两个数据源的包是否有差异
     * @param sourceId1
     * @param sourceId2
     * @param packageName
     * @param diff
     * @return
     */
    List<PackageCompareResult> comparePackage(Long sourceId1, Long sourceId2, String packageName, Integer diff);

    /**
     * 查询包
     * @param sourceId
     * @param packageName
     * @return
     */
    DbmsPackage queryDbmsPackage(Long sourceId, String packageName);

}
